:root {
    /* 主要颜色变量定义 */
    --primary-color: #667eea;
    --primary-dark-color: #764ba2;
    --secondary-color: #1abc9c;
    --secondary-dark-color: #16a085;
    --accent-color: #e74c3c;
    --accent-dark-color: #c0392b;
    --sidebar-bg: #2c3e50;
    --sidebar-bg-dark: #1a2530;
    --header-bg: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark-color) 100%);
    --sidebar-bg-gradient: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-bg-dark) 100%);
    --text-color: #333;
    --text-light-color: #7f8c8d;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --border-color: #eee;
    --hover-bg: #f8f9fa;
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --modal-header-bg: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark-color) 100%);
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* 头部样式 */
.header {
    background: var(--header-bg);
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 22px;
    font-weight: 600;
}

.manager-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 容器布局 */
.container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg-gradient);
    color: white;
    padding: 20px 0;
    box-shadow: 3px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(26, 188, 156, 0.2);
    border-left: 4px solid var(--secondary-color);
}

/* 确保所有导航图标都能正确显示 */
.nav-icon {
    font-size: 18px;
    line-height: 1;
    /* 添加字体支持 */
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 特别为课程阶段图标添加备用方案 */
.sub-nav-btn[data-target="course-stage"] .nav-icon {
    content: "📚";
    /* 如果Unicode字符无法显示，使用替代方案 */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>');
    background-repeat: no-repeat;
    background-position: center;
    width: 18px;
    height: 18px;
    display: inline-block;
}

.nav-item span.nav-icon {
    font-size: 18px;
}

.nav-item span.nav-text {
    font-size: 15px;
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 25px;
    overflow: auto;
    background: var(--bg-color);
}

.content-panel {
    display: none;
    animation: fadeIn 0.5s;
}

.content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.panel-header h2 {
    color: var(--sidebar-bg);
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
}

/* 课程管理子面板导航 */
.sub-nav {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 10px 10px 0 0;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sub-nav-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-light-color);
    position: relative;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-nav-btn.active {
    color: var(--secondary-color);
    font-weight: 600;
}

.sub-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 3px 3px 0 0;
}

.sub-nav-btn:hover {
    background: var(--hover-bg);
    color: var(--sidebar-bg);
}

/* 子面板样式 */
.sub-panel {
    display: none;
    animation: fadeIn 0.5s;
}

.sub-panel.active {
    display: block;
}

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: inline-block;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.search-input {
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    min-width: 250px;
    transition: all 0.3s;
    background: var(--hover-bg);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

/* 表格样式 */
.table-container {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--hover-bg);
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: var(--hover-bg);
    transform: scale(1.005);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 音频列表特定样式 */
#audios-table thead th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

#audios-table tbody td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#audios-table .id-col {
    width: 60px;
    text-align: center;
}

#audios-table .content-col {
    width: 200px;
    text-align: left;
}

#audios-table .name-col {
    width: 200px;
    text-align: left;
}

#audios-table .date-col {
    width: 140px;
    text-align: center;
}

#audios-table .operation-col {
    width: 160px;
    text-align: center;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn.primary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark-color) 100%);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.3);
}

.btn.primary:hover {
    background: linear-gradient(135deg, var(--secondary-dark-color) 0%, #138a72 100%);
    border-color: var(--secondary-dark-color);
    box-shadow: 0 6px 12px rgba(26, 188, 156, 0.4);
    transform: translateY(-2px);
}

.btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn.danger {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark-color) 100%);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
    border-radius: 6px;
}

.btn.danger:hover {
    background: linear-gradient(135deg, var(--accent-dark-color) 0%, #a5281b 100%);
    border-color: var(--accent-dark-color);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
    transform: translateY(-2px);
    border-radius: 6px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from { opacity: 0; transform: translateY(-60px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    font-weight: 500;
    font-size: 18px;
}

.modal-header .close {
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    top: 2px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-header .close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.file-preview {
    margin-top: 10px;
}

.file-preview img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding: 15px 25px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }
}

.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    max-width: calc(100% - 2px);
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestions {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-width: calc(100% - 2px);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.user-tag .close-tag {
    cursor: pointer;
    font-size: 12px;
    color: #999;
    margin-left: 8px;
}

.user-tag .close-tag:hover {
    color: #333;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    transition: all 0.3s;
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.user-nickname {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* 响应式设计 */
@media (max-width: 768px) {

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .user-nickname {
        max-width: 100%;
    }
}
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-control-file {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control-file:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 音频播放器模态框样式 */
.audio-player-modal {
    max-width: 500px;
    margin: 0 auto;
}

.audio-player-modal .modal-body {
    padding: 20px;
}

.audio-player-container {
    text-align: center;
    margin: 20px 0;
}

.audio-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.download-link {
    margin-bottom: 5px;
    display: inline-block;
}

/* home.css - 内容详情美化 */
.content-detail-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content-detail-header h2 {
    color: #333;
    font-size: 1.8em;
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.content-detail-cover img {
    display: block;
    margin: 20px auto;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.content-detail-cover img:hover {
    transform: scale(1.02);
}

.content-detail-body {
    margin: 20px 0;
    line-height: 1.6;
    color: #444;
    font-size: 1em;
}

.content-detail-body .content-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.content-detail-footer {
    padding: 15px 0;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.content-detail-footer p {
    margin: 5px 0;
}

.label {
    font-weight: bold;
    color: #333;
    margin-right: 8px;
}

.content-detail-actions {
    text-align: center;
    margin-top: 20px;
}

.content-detail-actions .btn {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.content-detail-actions .btn:hover {
    background-color: #0056b3;
}

/* 响应式支持 */
@media (max-width: 768px) {
    .content-detail-container {
        margin: 10px;
        padding: 15px;
    }

    .content-detail-header h2 {
        font-size: 1.5em;
    }

    .content-detail-body .content-text {
        padding: 8px;
    }
}




